Component({
  data: {
    selected: 0, // 当前显示下标
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: []
  },
  attached() {
    this.setData({
      list: getApp().globalData.list
    })
  },
  methods: {
    switchTab(e) {
      // const { isNansha } = getApp().globalData
      // this.setData({
      //   list:isNansha ? getApp().globalData.list_nansha :  getApp().globalData.list
      // })
      console.log(this.data.list)
      const data = e.currentTarget.dataset
      console.log(data)
      const url = data.path
      console.log(url)
      wx.switchTab({url})
      this.setData({
        selected: data.index,
      })
    }
  }
})
